import {get} from '@/utils/request'

const actions={
    findAllInfor(context,list){
        get('/article/findAllRecommend',list).then(res=>{
            console.log(res.data);
            if(res.status===200){
                let response=res.data.list
                context.commit('SET_INFORS',response)
                let total=res.data.total
                context.commit('SET_TOTAL',total)
            }
        })

    },
    
}

const mutations={
    SET_INFORS(state,response){
        state.Infors=response
    },
    SET_TOTAL(state,total){
        state.total=total
    }
}
const state={
    Infors:[],
    total:0
}

export default {
    namespaced:true,
    actions,
    mutations,
    state
}